cmake_minimum_required(VERSION 2.6)

project(shinygami)

set(CMAKE_BUILD_TYPE Debug)
set(LIBS ${LIBS} .)

if(${UNIX})
  set(CMAKE_CXX_FLAGS "-std=c++0x")
  include_directories(Include/)
  file(GLOB
       baseFile
       Base/*.cpp
       Base/Widgets/*.cpp
       Base/Linux/*.cpp)
else()
  set(CMAKE_CXX_FLAGS "-std=c++0x -DWIN32 -LC:/SFML")
  include_directories(Include/ C:/SFML/)
  file(GLOB
       baseFile
       Base/*.cpp
       Base/Widgets/*.cpp
       Base/Windows/*.cpp)
endif()
     
file(GLOB_RECURSE
     applejackFile
     Applejack/*.cpp)

file(GLOB_RECURSE
     includeFiles
     Include/)

add_library(shinygami-base             STATIC ${baseFile})
add_library(shinygami-applejack        STATIC ${applejackFile})

#add_executable(levelSampler     applejackSampler.cpp)
#add_executable(shinygami        shinygami.cpp)

if(${UNIX})
#  target_link_libraries(levelSampler dl sfml-system sfml-window sfml-graphics sfml-audio Box2D yaml shinygami-applejack shinygami-base)
#  target_link_libraries(shinygami    dl sfml-system sfml-window sfml-graphics sfml-audio Box2D yaml shinygami-applejack shinygami-base)
else()
#  target_link_libraries(levelSampler shinygami-applejack shinygami-base sfml-system sfml-window sfml-graphics sfml-audio Box2D yaml )
#  target_link_libraries(shinygami    shinygami-applejack shinygami-base sfml-system sfml-window sfml-graphics sfml-audio Box2D yaml )
endif()

install(FILES   ${includeFiles} DESTINATION include)
install(TARGETS shinygami-base shinygami-applejack ARCHIVE DESTINATION lib)
